/**
 * 
 */
package wftElements;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * @author ashutosh
 *
 */
public class Message extends CommonFields implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private ItemType itemType;
	private String subject;
	private String body;
	private String htmlBody;
	private int defaultPriority;
	private Role readRole;
	private String readRoleName;
	private Role writeRole;
	private String writeRoleName;
	private String itemTypeName;
	/**
	 * @return the readRoleName
	 */
	public String getReadRoleName() {
		return readRoleName;
	}
	/**
	 * @param readRoleName the readRoleName to set
	 */
	public void setReadRoleName(String readRoleName) {
		this.readRoleName = readRoleName;
	}
	/**
	 * @return the writeRoleName
	 */
	public String getWriteRoleName() {
		return writeRoleName;
	}
	/**
	 * @param writeRoleName the writeRoleName to set
	 */
	public void setWriteRoleName(String writeRoleName) {
		this.writeRoleName = writeRoleName;
	}
	/**
	 * @return the itemTypeName
	 */
	public String getItemTypeName() {
		return itemTypeName;
	}
	/**
	 * @param itemTypeName the itemTypeName to set
	 */
	public void setItemTypeName(String itemTypeName) {
		this.itemTypeName = itemTypeName;
	}
	private List<MessageAttribute> msgAttrList;
	/**
	 * @return the itemType
	 */
	public ItemType getItemType() {
		return itemType;
	}
	/**
	 * @param itemType the itemType to set
	 */
	public void setItemType(ItemType itemType) {
		this.itemType = itemType;
	}
	/**
	 * @return the subject
	 */
	public String getSubject() {
		return subject;
	}
	/**
	 * @param subject the subject to set
	 */
	public void setSubject(String subject) {
		this.subject = subject;
	}
	/**
	 * @return the body
	 */
	public String getBody() {
		return body;
	}
	/**
	 * @param body the body to set
	 */
	public void setBody(String body) {
		this.body = body;
	}
	/**
	 * @return the htmlBody
	 */
	public String getHtmlBody() {
		return htmlBody;
	}
	/**
	 * @param htmlBody the htmlBody to set
	 */
	public void setHtmlBody(String htmlBody) {
		this.htmlBody = htmlBody;
	}
	/**
	 * @return the defaultPriority
	 */
	public int getDefaultPriority() {
		return defaultPriority;
	}
	/**
	 * @param defaultPriority the defaultPriority to set
	 */
	public void setDefaultPriority(int defaultPriority) {
		this.defaultPriority = defaultPriority;
	}
	/**
	 * @return the readRole
	 */
	public Role getReadRole() {
		return readRole;
	}
	/**
	 * @param readRole the readRole to set
	 */
	public void setReadRole(Role readRole) {
		this.readRole = readRole;
	}
	/**
	 * @return the writeRole
	 */
	public Role getWriteRole() {
		return writeRole;
	}
	/**
	 * @param writeRole the writeRole to set
	 */
	public void setWriteRole(Role writeRole) {
		this.writeRole = writeRole;
	}
	/**
	 * @return the msgAttrList
	 */
	public List<MessageAttribute> getMsgAttrList() {
		if(msgAttrList == null){
			msgAttrList = new ArrayList<MessageAttribute>();
		}
		return msgAttrList;
	}
	/**
	 * @param msgAttrList the msgAttrList to set
	 */
	public void setMsgAttrList(List<MessageAttribute> msgAttrList) {
		this.msgAttrList = msgAttrList;
	}
}
